package com.yidu.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>@Description: No Description</p>
 * <p>@Author Wanghong</p>
 * <p>@Date: 2021/7/30</p>
 * <p>@Time: 9:59</p>
 * <p>@version 1.0</p>
 */
public class BaseMessage {
    private String resp;
    private String msg;
    private Object data;


    public String getResp() {
        return resp;
    }

    public void setResp(String resp) {
        this.resp = resp;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    /**
     * 判断
     * @param resp 状态1，0
     * @param msg 提示信息
     * @return
     */
    public static Map<String,Object> judge(String resp,String msg){
        Map<String,Object> map= new HashMap<>();
        map.put("resp",resp);
        map.put("msg",msg);
        return map;

    }

    /**
     * 传参数的判断
     * @param resp 状态1，0
     * @param msg 提示信息
     * @param o 数据
     * @return
     */
    public static Map<String,Object> judge(String resp,String msg,Object o){
        Map<String,Object> map= new HashMap<>();
        map.put("resp",resp);
        map.put("msg",msg);
        map.put("data",o);
        return map;

    }

}
